{% extends "base.html" %} {% block head %}
<script src="{{ url_for('static', path='/execute.js') }}"></script>
{% endblock %} {% block content %}
<div class="container-fluid pb-3">
  <div class="d-grid gap-3" style="grid-template-columns: 2fr 3fr">
    <div class="bg-body-tertiary border rounded-3 p-3">
      <div>
        <div class="mb-3">
          <label for="prompt" class="form-label">Prompt</label>
          <textarea id="prompt" name="prompt" class="form-control"></textarea>
        </div>
        <div class="mb-3">
          <label for="files" class="form-label">Files</label>
          <input id="files" type="file" class="form-control" />
        </div>
        <div class="mb-3">
          <label for="session" class="form-label">Session</label>
          <input id="session" name="session" class="form-control" />
        </div>
        <button
          id="submit"
          type="submit"
          class="btn btn-primary"
          onclick="submit(event)"
        >
          Submit
        </button>
        <button
          id="submit-loader"
          class="btn btn-primary disabled"
          style="display: none"
        >
          Submit
          <div class="spinner-border spinner-border-sm"></div>
        </button>
      </div>
    </div>
    <div class="bg-body-tertiary border rounded-3 p-2">
        <div id="actions"></div>
        <div class="card m-2">
          <div class="card-body">
            <div id="answer" class="card-text"></div>
            <div id="response-files" class="card-text"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script>
    setRandomSessionId();
  </script>
</div>
{% endblock %}
